﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GDBLL.Engine.Charactor
{
    public class CharactorManager
    {
        private ICharactorProvider m_charactorProvider;
        private object m_state = new object();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="provider">ICharactorProvider</param>
        /// <param name="count"></param>
        public CharactorManager(ICharactorProvider provider, int count)
        {
            //抛出异常不能包含属性，参数等内部信息。
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (count <= 0)
                throw new ArgumentOutOfRangeException("count");

            this.m_charactorProvider = provider;
        }

        public CharactorManager(ICharactorProvider provider)
            : this(provider, 2)
        { }


        public void InitializeCharactorClient(string privateToken)
        {
            //从数据库中获取数据
        }
    }
}
